package main

import "fmt"

type Animal interface{
	Grow()
	Move(string)
}

type Cat struct{
	Name string
	Age int
	Location string
}

func (cat *Cat) Grow(){
	cat.Age++
}

func (cat *Cat) Move(newLocation string){
	oldLocation:=cat.Location
	cat.Location=newLocation
	fmt.Printf("%s moves from %s to %s",cat.Name,oldLocation,newLocation)
}

func main(){
	myCat:=Cat{"Kitty",2,"bedroom"}
	animal,ok:=interface{}(&myCat).(Animal)
	fmt.Printf("%v, %v\n",ok,animal)
	animal.Move("kitchen")
}